package com.stargate.bd.bean;

import java.sql.Date;

public class Reservation {

	public static final String TABLE_NAME = "RESERVATION";
	
	private int idGroupePers;
	private String codeBatiment;
	private int numeroSalle;
	private String libellePlageSemaine;
	private String libellePlageHoraire;
	private Date dateResa;
	private int jourSemaine;

	public Reservation(int idGroupePers, String codeBatiment, int numeroSalle,
			String libellePlageSemaine, String libellePlageHoraire,
			Date dateResa, int jourSemaine) {
		this.idGroupePers = idGroupePers;
		this.codeBatiment = codeBatiment;
		this.numeroSalle = numeroSalle;
		this.libellePlageSemaine = libellePlageSemaine;
		this.libellePlageHoraire = libellePlageHoraire;
		this.dateResa = dateResa == null ?
				FormatDate.dateSystemSQL() : dateResa;
		this.jourSemaine = jourSemaine;
	}

	public Reservation(int idGroupePers, String codeBatiment, int numeroSalle,
			String libellePlageSemaine, String libellePlageHoraire,
			int jourSemaine) {
		this.idGroupePers = idGroupePers;
		this.codeBatiment = codeBatiment;
		this.numeroSalle = numeroSalle;
		this.libellePlageSemaine = libellePlageSemaine;
		this.libellePlageHoraire = libellePlageHoraire;
		this.jourSemaine = jourSemaine;
		// Date_Resa = date système par défaut
		dateResa = FormatDate.dateSystemSQL();
	}

	public int getIdGroupePers() {
		return idGroupePers;
	}

	public void setIdGroupePers(int idGroupePers) {
		this.idGroupePers = idGroupePers;
	}

	public String getCodeBatiment() {
		return codeBatiment;
	}

	public void setCodeBatiment(String codeBatiment) {
		this.codeBatiment = codeBatiment;
	}

	public int getNumeroSalle() {
		return numeroSalle;
	}

	public void setNumeroSalle(int numeroSalle) {
		this.numeroSalle = numeroSalle;
	}

	public String getLibellePlageSemaine() {
		return libellePlageSemaine;
	}

	public void setLibellePlageSemaine(String libellePlageSemaine) {
		this.libellePlageSemaine = libellePlageSemaine;
	}

	public String getLibellePlageHoraire() {
		return libellePlageHoraire;
	}

	public void setLibellePlageHoraire(String libellePlageHoraire) {
		this.libellePlageHoraire = libellePlageHoraire;
	}

	public Date getDateResa() {
		return dateResa;
	}

	public void setDateResa(Date dateResa) {
		this.dateResa = dateResa;
	}

	public int getJourSemaine() {
		return jourSemaine;
	}

	public void setJourSemaine(int jourSemaine) {
		this.jourSemaine = jourSemaine;
	}

}
